/**
 * AI 模块索引文件
 * 统一导出所有AI相关功能
 */

// 导出主要的AI响应生成功能
export {
    generateAIResponse,
    type AIResponse,
    type AIRequestOptions
} from './generateAIResponse.ts';

// API调用相关
export {
    ensureApiInitialized,
    getInvoke
} from './apiInvoke.ts';

// 模型工具
export {
    isQuotaOrBillingError,
    getApiKeyForModel,
    getHumanReadableError,
    getProviderForModel
} from './modelUtils.ts';

// 消息压缩和处理
export {
    intelligentCompressHistory,
    summarizeConversation,
    generateEntitySummary
} from './messageCompression.ts';

// Token计算相关
export {
    estimateTokenCount,
    countTokensInMessages,
    limitMessagesToTokenCount
} from './tokenCounter.ts';

// 实体提取
export {
    entityManager,
    type Entity,
    EntityType
} from './entityExtractor.ts';

// 对话工具
export {
    generateUniqueId,
    groupMessagesByTurn,
    createUserMessage,
    createAssistantMessage,
    createSystemMessage,
    splitIntoChunks
} from './conversationUtils.ts';

// 响应处理
export {
    simulateStreamResponse,
    handleStreamResponse,
    startInitialResponseSimulation,
    stopResponseSimulation
} from './responseProcessor.ts';

// 导出各个模块，方便按需导入完整功能
export * as apiInvoke from './apiInvoke.ts';
export * as modelUtils from './modelUtils.ts';
export * as messageCompression from './messageCompression.ts';
export * as tokenCounter from './tokenCounter.ts';
export * as entityExtractor from './entityExtractor.ts';
export * as conversationUtils from './conversationUtils.ts';
export * as responseProcessor from './responseProcessor.ts'; 